package org.sharding.jdbc.spring.boot.autoconfigure;

import java.util.HashMap;
import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;

import com.alibaba.druid.pool.DruidDataSource;

import io.shardingsphere.api.config.rule.MasterSlaveRuleConfiguration;
import io.shardingsphere.core.yaml.masterslave.YamlMasterSlaveRuleConfiguration;

@ConfigurationProperties(prefix = "sharding.jdbc")
public class ShardingMastSlaveProperties {

	/**
	 * 数据源
	 */
	private Map<String, DruidDataSource> dataSources = new HashMap<String, DruidDataSource>();

	/**
	 * 主从规则配置
	 */
	private MasterSlaveRuleConfiguration masterSlaveRule;

	public Map<String, DruidDataSource> getDataSources() {
		return dataSources;
	}

	public void setDataSources(Map<String, DruidDataSource> dataSources) {
		this.dataSources = dataSources;
	}

	public MasterSlaveRuleConfiguration getMasterSlaveRule() {
		return masterSlaveRule;
	}

	public void setMasterSlaveRule(MasterSlaveRuleConfiguration masterSlaveRule) {
		this.masterSlaveRule = masterSlaveRule;
	}

	
}
